<?php if(empty($r['refund'])){ echo "亲，暂时还没有退货信息哦~"?>
<?php }else{?>
    <form>
        <fieldset>
            <legend></legend>
            <table id="dataTable">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>订单号</th>
                    <th>购买者电话</th>
                    <th>金额</th>
                    <th>退货原因</th>
                    <th>退货类型</th>
                    <th>当前状态</th>
                    <th>是否结算</th>
                    <th>用户申请时间</th>
                    <th>用户发货时间</th>
                    <th>商家确认收货时间</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($r['refund'] as $v){?>
                    <tr>
                        <td><?php echo $v['id']?></td>
                        <td><?php echo $v['order_id']?></td>
                        <td><?php echo $v['user_id']?></td>
                        <td>￥<?php echo $v['money']?></td>
                        <td><?php echo $v['reason']?></td>
                        <td><?php if($v['type']==0)echo "仅退款";?><?php if($v['type']==1)echo "退货后退款";?></td>
                        <td><?php foreach($r['currentState'] as $k=>$s){?>
                                <?php if($k==$v['state']) echo $s?>
                            <?php } ?></td>
                        <td><?php if($v['allocate']==0)echo "未结算";?><?php if($v['allocate']==1)echo "已结算";?></td>
                        <td><?php echo $v['create_time']?></td>
                        <td><?php echo $v['shipping_time']?></td>
                        <td><?php echo $v['confirm_time']?></td>

                    </tr>
                <?php }?>
                </tbody>
            </table>
        </fieldset>
    </form>
    <?php
    /** @var Page $page */
    $page=$r['pages'];
    ?>
    <?php echo $page->getPageHtml(); ?>
<?php }?>